import { EnumRoutePath, EnumRouteTitle } from '@/enum'
import { CustomRoute } from '@/interface'
import { BasicLayout, MultiMenuLayout } from '@/layouts'
import { SecondLevelMenu } from '@/views/multimenu'
import { Menu } from '@vicons/carbon'
import { RouteNameMap } from '../helpers'

const MULTI_MENU: CustomRoute = {
  name: RouteNameMap.get('multimenu'),
  path: EnumRoutePath.multimenu,
  component: BasicLayout,
  redirect: { name: RouteNameMap.get('multimenu-first') },
  meta: {
    title: EnumRouteTitle.multimenu,
    icon: Menu,
  },
  children: [
    {
      name: RouteNameMap.get('multimenu-first'),
      path: EnumRoutePath['multimenu-first'],
      component: MultiMenuLayout,
      meta: {
        keepAlive: true,
        title: EnumRouteTitle['multimenu-first'],
      },
      children: [
        {
          name: RouteNameMap.get('multimenu-first-second'),
          path: EnumRoutePath['multimenu-first-second'],
          component: SecondLevelMenu,
          meta: {
            keepAlive: true,
            title: EnumRouteTitle['multimenu-first-second'],
          },
        },
      ],
    },
  ],
}

export default MULTI_MENU
